package com.sgb.zhaocai.service;

import com.sgb.link.entity.BrandEntity;
import com.sgb.link.entity.GetSkuEntity;
import com.sgb.link.entity.PickInvitedApply;
import com.sgb.zhaocai.entity.AddInviteExternalListBean;
import com.sgb.zhaocai.entity.DemandForecastListBean;
import com.sgb.zhaocai.entity.DemandForecastListEntity;
import com.sgb.zhaocai.entity.DemandIssueBean;
import com.sgb.zhaocai.entity.DemandIssueListEntity;
import com.sgb.zhaocai.entity.DemandOfferBean;
import com.sgb.zhaocai.entity.FilterListEntity;
import com.sgb.zhaocai.entity.FindRuleBean;
import com.sgb.zhaocai.entity.LabourWorkListEntity;
import com.sgb.zhaocai.entity.LeaseNeedListEntity;
import com.sgb.zhaocai.entity.MapLongAndLatEntity;
import com.sgb.zhaocai.entity.MarketCompanyEntitly;
import com.sgb.zhaocai.entity.MarketPersonalEntitly;
import com.sgb.zhaocai.entity.MaterialListEntity;
import com.sgb.zhaocai.entity.MemberCompanyEntitly;
import com.sgb.zhaocai.entity.OfferDetailsEntitly;
import com.sgb.zhaocai.entity.OfferListEntity;
import com.sgb.zhaocai.entity.PickInvitedList;
import com.sgb.zhaocai.entity.ProjectIssueBean;
import com.sgb.zhaocai.entity.ProjectIssueListEntity;
import com.sgb.zhaocai.entity.ProjectListEntity;
import com.sgb.zhaocai.entity.PublicTypeEntity;
import com.sgb.zhaocai.entity.PublishDetailEntity;
import com.sgb.zhaocai.entity.PublishListBean;
import com.sgb.zhaocai.entity.RequestBean;
import com.sgb.zhaocai.entity.SubpackagePlanListEntity;
import com.sgb.zhaocai.entity.TenderExternalListEntity;
import com.swgk.core.base.model.entity.BaseEntity;
import com.swgk.core.base.model.entity.H5ReEntity;
import com.swgk.core.base.model.entity.ListResponse;
import com.swgk.core.base.model.factory.BaseUrlInterceptor;
import com.swgk.core.util.PickSelectEntity;
import com.swgk.core.view.areapopup.AddressEntity;
import com.swgk.core.view.entity.MenuEntity;
import com.swgk.core.view.selection.CommonPopEntity;

import java.util.List;
import java.util.Map;

import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.PartMap;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * Time:2021/7/1
 * AUTHOR:F_Q
 * Description:招采模块接口请求
 */
public interface TenderPurchaseApi {


    //工程项目列表
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v5/app/recruit/projectList")
    Call<BaseEntity<ListResponse<List<ProjectListEntity>>>> getProjectList(@Body RequestBean map);

    //材料采购列表
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v5/app/recruit/materialList")
    Call<BaseEntity<ListResponse<List<MaterialListEntity>>>> getMaterialList(@Body RequestBean map);

    //机械列表
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v5/app/recruit/mechanicalList")
    Call<BaseEntity<ListResponse<List<LeaseNeedListEntity>>>> getLeaseNeedList(@Body RequestBean map);

    //设备列表列表
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v5/app/recruit/equipmentList")
    Call<BaseEntity<ListResponse<List<LeaseNeedListEntity>>>> getEquipmentList(@Body RequestBean map);

    //劳务用工
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v5/app/recruit/laborList")
    Call<BaseEntity<ListResponse<List<LabourWorkListEntity>>>> getLabourWorkList(@Body RequestBean map);

    //分包计划
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v5/app/recruit/subcontractPlanList")
    Call<BaseEntity<ListResponse<List<SubpackagePlanListEntity>>>> getSubpackagePlanList(@Body RequestBean map);

    //竞价详情H5
    @FormUrlEncoded
    @POST("v1/app/common/getUrlSetting")
    Call<BaseEntity<H5ReEntity>> getUrlSetting(@Field("param") String param);

    //获取三级地址列表
    @GET("common/simpleArea.json")
    Call<BaseEntity<List<AddressEntity<List<AddressEntity<List<AddressEntity>>>>>>> getAddressEntityCityList();

    //需求预告工程类型筛选框
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @GET("v5/app/recruit/findEngineeringTypeSelect")
    Call<BaseEntity<List<CommonPopEntity>>> getFindEngineeringTypeSelect();

    //需求预告时间筛选框
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @GET("v5/app/recruit/findProjectTimeSelect")
    Call<BaseEntity<List<CommonPopEntity>>> getfindProjectTimeSelect();


    //招标大厅-材料采购列表
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v5/app/recruit/materialHomeList")
    Call<BaseEntity<ListResponse<List<DemandForecastListEntity>>>> getMaterialHomeList(@Body DemandForecastListBean bean);

    //招标大厅-机械需求列表
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v5/app/recruit/mechanicalHomeList")
    Call<BaseEntity<ListResponse<List<DemandForecastListEntity>>>> getMechanicalHomeList(@Body DemandForecastListBean bean);
    //招标大厅-设备需求列表
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v5/app/recruit/equipmentHomeList")
    Call<BaseEntity<ListResponse<List<DemandForecastListEntity>>>> getEquipmentHomeList(@Body DemandForecastListBean bean);

    //招标大厅-劳务用工列表
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v5/app/recruit/laborHomeList")
    Call<BaseEntity<ListResponse<List<DemandForecastListEntity>>>> getLaborHomeList(@Body DemandForecastListBean bean);

    //招标大厅-分包计划列表
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v5/app/recruit/subcontractPlanHomeList")
    Call<BaseEntity<ListResponse<List<DemandForecastListEntity>>>> getSubcontractPlanHomeList(@Body DemandForecastListBean bean);

    //项目管理获取企业列表
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @GET("v6/app/user/organizational/selectMyCompnayList")
    Call<BaseEntity<List<PublishListBean>>> getMyCompanyList();

    //项目管理获取部门列表
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @GET("v6/app/user/organizational/getDeptList")
    Call<BaseEntity<List<PublishListBean>>> getDeptList(@Query("companyId") String companyId);

    //项目管理工程类型
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @GET("v5/app/recruit/findEngineeringTypeSelect")
    Call<BaseEntity<List<PublishListBean>>> getProjectTypeList();

    //获取地址经纬度
    @POST("v1/app/logistics/getAddressCoordinate")
    Call<BaseEntity<MapLongAndLatEntity>> getLocationLL(@Query("areaCode") String areaCode, @Query("provinceNo") String provinceNo, @Query("cityNo") String cityNo, @Query("districtNo") String districtNo);

    //招标大厅-材料采购列表
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v6/app/recruit/ProjectList")
    Call<BaseEntity<ListResponse<List<ProjectIssueListEntity>>>> getProjectIssueList(@Body RequestBean bean);

    //经营帮的数据是否公示
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v6/app/recruit/updateProjectIsAnnounce")
    Call<BaseEntity> getUpdateProjectIsAnnounce(@Body Map bean);

    //经营帮的数据是否公示
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v6/app/recruit/saveOrUpdateProject")
    Call<BaseEntity> saveOrUpdateProject(@Body ProjectIssueBean bean);

    //项目管理获取企业列表
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @GET("v6/app/user/organizational/getPersonnel")
    Call<BaseEntity<List<PublishListBean>>> getPersonnel(@Query("departmentId") String departmentId);

    //项目管理-编辑
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @GET("v6/app/recruit/detail")
    Call<BaseEntity<PublishDetailEntity>> getDetail(@Query("id") String id);

    //项目管理-编辑
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @GET("v6/app/recruit/filterList")
    Call<BaseEntity<List<FilterListEntity>>> getFilterList();

    //获取设备分类类型
    @GET("v1/app/equipment/categoryList")
    Call<BaseEntity<List<PublicTypeEntity<List<PublicTypeEntity>>>>> getDeviceType(@Query("categoryNo") String categoryNo);

    //获取机械类型
    @GET("v1/app/machinery/categoryList")
    Call<BaseEntity<List<PublicTypeEntity<List<PublicTypeEntity>>>>> getMachineOutType();

    //设备分类弹窗
    @GET("v1/app/equipment/categoryList")
    Call<BaseEntity<List<CommonPopEntity>>> getDeviceTypeList(@Query("categoryNo") String categoryNo);

    //机械分类弹窗
    @GET("v1/app/machinery/categoryList")
    Call<BaseEntity<List<CommonPopEntity>>> getMachineOutTypeList();

    //商品分类
    @FormUrlEncoded
    @POST("v1/app/user/goods/goodsCategory")
    Call<BaseEntity<List<MenuEntity<MenuEntity<MenuEntity>>>>> getGoodsCategory(@Field("areaCode") String areaCode);

    //商品分类弹窗
    @FormUrlEncoded
    @POST("v1/app/user/goods/goodsCategory")
    Call<BaseEntity<List<CommonPopEntity>>> getGoodsType(@Field("areaCode") String areaCode);

    //经营帮的数据是否公示
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v5/notice/businessPlan/saveOrUpdateBusinessPlan")
    Call<BaseEntity> saveOrUpdateBusinessPlan(@Body DemandIssueBean bean);

    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v5/notice/businessPlan/getBusinessPlanList")
    Call<BaseEntity<ListResponse<List<DemandIssueListEntity>>>> getBusinessPlanList(@Body RequestBean bean);

    //经营帮的数据是否公示
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v5/notice/businessPlan/updateBusinessPlanIsAnnounce")
    Call<BaseEntity> getUpdateBusinessPlanIsAnnounce(@Body Map bean);


    //项目管理-编辑
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @GET("v5/notice/businessPlan/getBusinessPlanDetail")
    Call<BaseEntity<DemandIssueBean>> getBusinessPlanDetail(@Query("id") String id);

    //项目管理-编辑
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @GET("v5/notice/businessPlan/businessPlanSelect")
    Call<BaseEntity<List<PublishListBean>>> getTabData();

    //我的报价-报价详情查询
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v5/app/recruit/findNoticeOffer")
    Call<BaseEntity<OfferDetailsEntitly>> getFindNoticeOffer(@Body Map bean);

    //报价列表查询
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v5/app/recruit/list")
    Call<BaseEntity<ListResponse<List<OfferListEntity>>>> getRecruitList(@Body RequestBean map);

    //上传单个文件
    @Multipart
    @POST("v1/app/common/fileUpload")
    Call<BaseEntity> uploadFile(@PartMap Map<String, RequestBody> files);

    //上传单个文件
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v5/app/recruit/save")
    Call<BaseEntity<String>> getsave(@Body DemandOfferBean files);

    //品牌-列表
    @FormUrlEncoded
    @POST("v1/app/user/goods/brandList")
    Call<BaseEntity<List<BrandEntity>>> getBrandList(@Field("id") String id, @Field("text") String text, @Field("companyId") String companyId);



    //判断是否可以配置规格
    @FormUrlEncoded
    @POST("v1/app/user/goods/getSku")
    Call<BaseEntity<List<GetSkuEntity>>> getSku(@Field("id") String cid3);

    /**
     * 招采-用户中心-邀请报名、邀请竞价界面接口
     * @param map
     * @return
     */
    //邀请竞价-邀请记录-列表
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v4/app/recruit/findInviteList")
    Call<BaseEntity<ListResponse<List<PickInvitedList>>>> findInviteList(@Body Map map);

    //邀请竞价-竞价信息-列表
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v4/app/recruit/findBidPage")
    Call<BaseEntity<ListResponse<List<PickInvitedApply>>>> getFindBidPage(@Body Map map);

    //邀请招标-邀请记录列表-列表
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v4/app/recruit/biddingInviteList")
    Call<BaseEntity<ListResponse<List<PickInvitedList>>>> biddingInviteList(@Body Map map);

    //邀请招标-招标信息列表
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v4/app/recruit/findSignPage")
    Call<BaseEntity<ListResponse<List<PickInvitedApply>>>> findSignPage(@Body Map map);

    //添加招标邀请信息
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v4/app/recruit/addBiddingInvite")
    Call<BaseEntity> addBiddingInvite(@Body Map map);

    //招标再次邀请
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @FormUrlEncoded
    @POST("v4/app/recruit/inviteBiddingAgain")
    Call<BaseEntity> inviteBiddingAgain(@Field("no") String no);

    //添加竞价邀请信息
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v4/app/recruit/addBidInvite")
    Call<BaseEntity> addBidInvite(@Body Map map);

    //再次邀请竞价
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @FormUrlEncoded
    @POST("v4/app/recruit/inviteBidAgain")
    Call<BaseEntity> inviteBidAgain(@Field("no") String no);

    /**
     * 邀请报名非网站客户列表
     * @param map
     * @return
     */
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v4/app/recruit/tenderExternalList")
    Call<BaseEntity<ListResponse<List<TenderExternalListEntity>>>> gettenderExternalList(@Body RequestBean map);

    /**
     * 邀请竞价非网站客户列表
     * @param map
     * @return
     */
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v4/app/recruit/bidExternalList")
    Call<BaseEntity<ListResponse<List<TenderExternalListEntity>>>> getbidExternalList(@Body RequestBean map);

    /**
     * 会员管理-需方会员供方会员
     */
    @Headers({BaseUrlInterceptor.HEADERS_URL_MEMBER, "tokenType:pc"})
    @POST("v1/app/member/mix/getMixMemberListByPage")
    Call<BaseEntity<ListResponse<List<MemberCompanyEntitly>>>> getMixMemberListByPage(@Body Map<String, Object> map);

    /**
     * 市场客户-企业
     */
    @Headers({BaseUrlInterceptor.HEADERS_URL_MEMBER, "tokenType:pc"})
    @POST("v4/app/recruit/biddingCompanyList")
    Call<BaseEntity<ListResponse<List<MarketCompanyEntitly>>>> getBiddingCompanyList(@Body Map<String, Object> map);
    /**
     * 市场客户-个人
     */
    @Headers({BaseUrlInterceptor.HEADERS_URL_MEMBER, "tokenType:pc"})
    @POST("v4/app/recruit/findPersonalUserByName")
    Call<BaseEntity<ListResponse<List<MarketPersonalEntitly>>>> getFindPersonalUserByName(@Body Map<String, Object> map);

    //获取企业类型
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @GET("v1/app/member/companyTypeList")
    Call<BaseEntity<List<CommonPopEntity>>> getCompanyTypeList();

    //距离范围筛选
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @GET("v4/app/recruit/findDistanceSelect")
    Call<BaseEntity<List<CommonPopEntity>>> getFindDistanceSelect();

    //会员星级筛选
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @GET("v4/app/recruit/memberGrade")
    Call<BaseEntity<List<CommonPopEntity>>> getMemberGrade();
    //会员类型筛选
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @GET("v1/app/member/memberTypeList")
    Call<BaseEntity<List<PickSelectEntity<List<PickSelectEntity<List<PickSelectEntity<List<PickSelectEntity<List<PickSelectEntity>>>>>>>>>>> getMemberTypeList(@Query("ascription") String id);
    /**
     * 邀请非网站客户
     */
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v4/app/recruit/saveZcInviteTenderExternal")
    Call<BaseEntity> getSaveZcInviteTenderExternal(@Body AddInviteExternalListBean map);

    /**
     * 竞价非网站客户
     */
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @POST("v4/app/recruit/saveZcInviteBidExternal")
    Call<BaseEntity> getsaveZcInviteBidExternal(@Body AddInviteExternalListBean map);


    /**
     * 邀请报名和邀请竞价订单地址列表获取
     * @return
     */
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @GET("v4/app/recruit/biddingRegion/{type}/{id}")
    Call<BaseEntity<List<AddressEntity<List<AddressEntity<List<AddressEntity>>>>>>> getbiddingRegionAddressList(@Path("id") String id, @Path("type") String type);

    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @GET("v4/app/recruit/findTenderRuleDetail/{tenderNo}")
    Call<BaseEntity<FindRuleBean>> getFindTenderRuleDetail(@Path("tenderNo") String id);

    @Headers({BaseUrlInterceptor.HEADERS_URL_ZC, "tokenType:pc"})
    @GET("v4/app/recruit/findBidderRuleDetail/{bidId}")
    Call<BaseEntity<FindRuleBean>> getFindBidderRuleDetail(@Path("bidId") String id);


}
